package com.itheima.zhaohang.mymoreitemsclicke;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by 赵航 on 2017/7/23.
 */

public class ToastUtils {

    private static Toast toast;
    public static void showToast(Context context, String text){
        if (toast==null){
            toast = Toast.makeText(context, text, Toast.LENGTH_LONG);
        }else {
            toast.setText(text);
        }
        toast.show();
    }
}
